package yuzhou;

import com.sun.jna.Library;
import com.sun.jna.Native;
import com.sun.jna.Pointer;
import com.sun.jna.platform.win32.WinNT;

public interface Kernel32 extends Library {
    Kernel32 INSTANCE = Native.loadLibrary("kernel32", Kernel32.class);

    Integer OpenProcess(Integer dwDesiredAccess,Integer bInheritHandle,Integer dwProcessId);
    Boolean CloseHandle(Integer hObject);
    Boolean ReadProcessMemory(Integer hProcess, Integer address, Pointer data, Integer len, Integer slen);
    Boolean WriteProcessMemory(Integer hProcess,Integer address,Pointer data,Integer len,Integer slen);
    Integer CreateToolhelp32Snapshot(Integer dwFlags,Integer th32ProcessID);
    Integer Module32First(Integer sp, byte[] a);
    Integer Module32Next(Integer sp, byte[] a);
    Integer Sleep(Integer dwMilliseconds);
    Integer VirtualQueryEx(Integer hProcess, Integer address, WinNT.MEMORY_BASIC_INFORMATION lpBuffer, Integer dwLength);
    Boolean SetConsoleTitleA(String lpConsoleTitle);
}
